Skip to content

chore!: remove search flag from docs command#470

Open
lukegalbraithrussell wants to merge 3 commits intodocs-search-subcommandfrom
docs-search-flag-removal
Open

chore!: remove search flag from docs command#470
lukegalbraithrussell wants to merge 3 commits intodocs-search-subcommandfrom
docs-search-flag-removal

Conversation

@lukegalbraithrussell
Copy link
Copy Markdown
Contributor

@lukegalbraithrussell lukegalbraithrussell commented Apr 3, 2026

Changelog

--search flag is now pointless given search subcommand.

Separate PR for ease-of-reviewing. Can merge into search subcommand or main!! up to CLI team

Summary

(Please describe the goal of this pull request and mention any related issue numbers)

Requirements

@lukegalbraithrussell lukegalbraithrussell requested a review from a team as a code owner April 3, 2026 19:50
cmd/docs/docs.go Outdated
"Invalid docs command. Did you mean to search?",
if cmd.Flags().Changed("search") {
return slackerror.New("docs_search_flag_removed").WithMessage(
"The --search flag has been removed.",
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude really didn't like me doing this but I think it's kinda polite?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧪 praise: This is quite clever erroring!

👾 ramble: I might agree that it'd be better to error without obvious remediation for a small few reasons:

  • The remediation isn't unusual of following "unknown flag" with "--help" IMHO
  • This requires some extra amount of code to consider with future changes
  • We might be quick to change the familiar flag behavior with the upcoming release
  • Possible adding this back in later releases causes a confusing error pattern

🔬 thought: Of course this is personal preference and I leave preferred remediation to you! But these breaking change give us a good chance to start fresh-

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.17%. Comparing base (e89d94d) to head (106f49b).

Additional details and impacted files
@@                    Coverage Diff                     @@
##           docs-search-subcommand     #470      +/-   ##
==========================================================
- Coverage                   71.26%   71.17%   -0.09%     
==========================================================
  Files                         222      222              
  Lines                       18658    18631      -27     
==========================================================
- Hits                        13296    13261      -35     
- Misses                       4181     4187       +6     
- Partials                     1181     1183       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@zimeg zimeg changed the title Removes search flag chore!: remove search flag from docs command Apr 6, 2026
@zimeg zimeg self-requested a review April 6, 2026 17:38
@zimeg zimeg added code health M-T: Test improvements and anything that improves code health semver:major Use on pull requests to describe the release version increment labels Apr 6, 2026
@zimeg zimeg added this to the Next Release milestone Apr 6, 2026
Copy link
Copy Markdown
Member

@zimeg zimeg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lukegalbraithrussell LGTM but I left a comment that suggest we can remove all references of the --search flag including remediation workarounds. No blocker!

Re: Merging to main or the base branch - I think either is alright! But I might've merged this to main foremost. Thanks for making this a separate PR! 🏁

cmd/docs/docs.go Outdated
"Invalid docs command. Did you mean to search?",
if cmd.Flags().Changed("search") {
return slackerror.New("docs_search_flag_removed").WithMessage(
"The --search flag has been removed.",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧪 praise: This is quite clever erroring!

👾 ramble: I might agree that it'd be better to error without obvious remediation for a small few reasons:

  • The remediation isn't unusual of following "unknown flag" with "--help" IMHO
  • This requires some extra amount of code to consider with future changes
  • We might be quick to change the familiar flag behavior with the upcoming release
  • Possible adding this back in later releases causes a confusing error pattern

🔬 thought: Of course this is personal preference and I leave preferred remediation to you! But these breaking change give us a good chance to start fresh-

@lukegalbraithrussell
Copy link
Copy Markdown
Contributor Author

@zimeg appreciate the blessed moon reviews. i removed the custom error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code health M-T: Test improvements and anything that improves code health semver:major Use on pull requests to describe the release version increment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants